C Language Introduction
C is a procedural programming language initially developed by Dennis Ritchie in the year 1972 at Bell Laboratories of AT&T Labs.
Why Should We Learn C?
Many later languages have borrowed syntax/features directly or indirectly from the
C language like the syntax of Java, PHP, JavaScript, and many other languages that
are mainly based on the C language.
Algorithms
An algorithm is a step-by-step, finite set of well-defined instructions or rules
designed to perform a specific task or solve a particular problem. It takes an input,
processes it, and produces an output within a finite amount of time. Algorithms are
the foundation of computer science and programming, enabling software and
systems to function efficiently and accurately.
Key Characteristics of an Algorithm
1.Input: The algorithm receives input, which is the data that will be processed.
2.Output: The algorithm produces an output after processing the input.
3.Definiteness: Each step of the algorithm must be precisely and unambiguously defined.
4.Finiteness: The algorithm must always terminate after a finite number of steps.
5.Effectiveness: The steps must be basic enough to be carried out, in principle, by a human using paper and pencil.
6.Generality: The algorithm should be applicable to a broad set of inputs, not just a single instance.
An algorithm should possess the following characteristics
1.Each and every instruction should be precise and clear
2.Each instruction should be performed a finite number of times.
3.The algorithm should ultimately terminate
4.When the algorithm terminates the desired result should be obtained
Algorithm
1Start
2.Input/Read
3.Process
4Decision
5.Print
Example of a Simple Algorithm
Calculate Summation of 3 no
i.Start
ii.Input A,B,C
iii.Sum = A+B+C
iv.Print
v.End
Flowchart
•A flowchart is a visual representation of the sequence of steps and decisions needed to perform a process.
•Each step in the sequence is noted within a diagram shape.
•Steps are linked by connecting lines and directional arrows.
• This allows anyone to view the flowchart and logically follow the process from beginning to end
Flowchart Symbols
| Symbol |
Names |
Function |
| 🟢 |
Start/End |
An oval represents a start or end point |
| ➡️ |
Arrows |
A line is a connector that shows relationships between the shapes |
| ▭ |
Input/Output |
A parallelogram represents input or output |
| 🔲 |
Process |
A rectangle represents a process |
| 🔶 |
Decision |
A diamond represents a decision |
Flowchart for Addition Of 2 No
Structure of C Program

Sample C Program
#include < stdio.h >
#include < conio.h >
int main()
{
printf(“Hello World!”);
return 0;
}
//Output
Hello World!